import { App , defineAsyncComponent, defineComponent} from "vue";
 async function componentInstall(app:App<any> ){
    const modules:any = import.meta.glob("./*/index.vue",{eager:true});
    for(const path in modules){
       const componentName = path.substring(2).replace("/index.vue","");
       console.log(componentName);
       // 方案一 普通引入
       app.component(componentName,defineComponent(modules[path].default));

    }
}

export default componentInstall